#ifndef CpTrack_h
#define CpTrack_h

#include <TObject.h>
#include <TClonesArray.h>
#include "CpPoint.h"

class CpTrack : public TObject {
public:
   CpTrack(const Int_t &index = 0);
   ~CpTrack();

   virtual void Print(Option_t* option = "") const;


   CpPoint *AddPoint(const Double_t &x=0, const Double_t &y=0, const Double_t &z=0, const Double_t &vx=0, const Double_t &vy=0, const Double_t &vz=0,const Double_t &time=0);
   CpPoint *GetPoint(const Int_t &index) { return (CpPoint*) fPoints.At(index);}
   CpPoint *GetLastPoint() { return (CpPoint*) fPoints.At(fNumberOfPoints-1);}
   Long64_t GetNumberOfPoints() { return fNumberOfPoints; }
   void SetIndex(const Int_t &index) {fIndex = index;};

private:

   Int_t         fIndex;
   Long64_t      fNumberOfPoints;
   TClonesArray  fPoints;


   ClassDef(CpTrack, 1);
};

#endif
